package cn.kgc.watch.service.impl;

import cn.kgc.watch.entity.Brand;
import cn.kgc.watch.mapper.BrandMapper;
import cn.kgc.watch.service.BrandService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BrandServiceImpl implements BrandService{

    @Resource
    private BrandMapper brandMapper;

    @Override
    public List<Brand> findAll() {
        return brandMapper.selectAll();
    }

    @Override
    public void addBrand(Brand brand) {
        brandMapper.insert(brand);
    }

    @Override
    public Brand findById(Integer id) {
        return brandMapper.selectById(id);
    }
}
